<?php
$config = array(
	//'配置项'=>'配置值'
	'URL_ROUTER_ON'   => true,
	'URL_ROUTE_RULES' =>array(
		'blog/read/:id' => '/blog/:1',
	),
	'URL_MODEL'           => 2, // 如果你的环境不支持PATHINFO 请设置为3
	'DB_TYPE'             => 'mysql',
	'DB_HOST'             => 'localhost',
	'DB_NAME'             => 'examples',
	'DB_USER'             => 'root',
	'DB_PWD'              => '',
	'DB_PORT'             => '3306',
	'DB_PREFIX'           => 'model_',
	// 'FIRE_SHOW_PAGE_TRACE'=>true,
);

if(isset($_ENV['VCAP_SERVICES'])){
	$json = json_decode($_ENV['VCAP_SERVICES'], true);
	$db = $json['mysql'][0]['credentials'];
	$file_root = $json['filesystem-1.0']['credentials']['host_path'];
	// $config['BD_DSN'] = $db['uri'];
	// $config['DB_DSN'] = str_replace('mysql2', 'mysql', $_ENV['DATABASE_URL']);
	$config['DB_HOST'] = $db['hostname'];
	$config['DB_NAME'] = $db['name'];
	$config['DB_USER'] = $db['username'];
	$config['DB_PWD'] = $db['password'];
	$config['DB_PORT'] = $db['port'];
}
return $config;